//
//  HRDemoViewController.swift
//  新浪微博
//
//  Created by 王之皆 on 17/1/4.
//  Copyright © 2017年 北京海狸先生网络科技有限公司. All rights reserved.
//

import UIKit

class HRDemoViewController: HRBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }
    
    func showNext() {
        let vc = HRDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }

}

extension HRDemoViewController{
     //重写父了的方法
    override func setupUI() {
        super.setupUI()
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(showNext))
    }

}






























































































































































